package fina2.dcs.common.xls;

public class OptionsRowInfo {
	private int id;
	private String code;
	private String name;
	private TableType type;
	private String startColumnName;
	private int startRowNumber;
	private int endRow;
	private boolean isProtected;
	private String eofFirst;
	private String eofSecond;
	private String sheetName;
	private String mixedTableStartString;
	private int afterRows;

	public int getId() {
		return id;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public TableType getType() {
		return type;
	}

	public String getStartColumnName() {
		return startColumnName;
	}

	public int getStartRowNumber() {
		return startRowNumber;
	}

	public int getEndRow() {
		return endRow;
	}

	public boolean isProtected() {
		return isProtected;
	}

	public String getEofFirst() {
		return eofFirst;
	}

	public String getEofSecond() {
		return eofSecond;
	}

	public String getSheetName() {
		return sheetName;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setType(TableType type) {
		this.type = type;
	}

	public void setStartColumnName(String startColumnName) {
		this.startColumnName = startColumnName;
	}

	public void setStartRowNumber(int startRowNumber) {
		this.startRowNumber = startRowNumber;
	}

	public void setEndRow(int endRow) {
		this.endRow = endRow;
	}

	public void setProtected(boolean isProtected) {
		this.isProtected = isProtected;
	}

	public void setEofFirst(String eofFirst) {
		this.eofFirst = eofFirst;
	}

	public void setEofSecond(String eofSecond) {
		this.eofSecond = eofSecond;
	}

	public void setSheetName(String sheetName) {
		this.sheetName = sheetName;
	}

	public String getMixedTableStartString() {
		return mixedTableStartString;
	}

	public int getAfterRows() {
		return afterRows;
	}

	public void setMixedTableStartString(String mixedTableStartString) {
		this.mixedTableStartString = mixedTableStartString;
	}

	public void setAfterRows(int afterRows) {
		this.afterRows = afterRows;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + afterRows;
		result = prime * result + ((code == null) ? 0 : code.hashCode());
		result = prime * result + endRow;
		result = prime * result + ((eofFirst == null) ? 0 : eofFirst.hashCode());
		result = prime * result + ((eofSecond == null) ? 0 : eofSecond.hashCode());
		result = prime * result + id;
		result = prime * result + (isProtected ? 1231 : 1237);
		result = prime * result + ((mixedTableStartString == null) ? 0 : mixedTableStartString.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((sheetName == null) ? 0 : sheetName.hashCode());
		result = prime * result + ((startColumnName == null) ? 0 : startColumnName.hashCode());
		result = prime * result + startRowNumber;
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		OptionsRowInfo other = (OptionsRowInfo) obj;
		if (afterRows != other.afterRows)
			return false;
		if (code == null) {
			if (other.code != null)
				return false;
		} else if (!code.equals(other.code))
			return false;
		if (endRow != other.endRow)
			return false;
		if (eofFirst == null) {
			if (other.eofFirst != null)
				return false;
		} else if (!eofFirst.equals(other.eofFirst))
			return false;
		if (eofSecond == null) {
			if (other.eofSecond != null)
				return false;
		} else if (!eofSecond.equals(other.eofSecond))
			return false;
		if (id != other.id)
			return false;
		if (isProtected != other.isProtected)
			return false;
		if (mixedTableStartString == null) {
			if (other.mixedTableStartString != null)
				return false;
		} else if (!mixedTableStartString.equals(other.mixedTableStartString))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (sheetName == null) {
			if (other.sheetName != null)
				return false;
		} else if (!sheetName.equals(other.sheetName))
			return false;
		if (startColumnName == null) {
			if (other.startColumnName != null)
				return false;
		} else if (!startColumnName.equals(other.startColumnName))
			return false;
		if (startRowNumber != other.startRowNumber)
			return false;
		if (type != other.type)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "OptionsRowInfo [id=" + id + ", code=" + code + ", name=" + name + ", type=" + type + ", startColumnName=" + startColumnName + ", startRowNumber=" + startRowNumber + ", endRow=" + endRow + ", isProtected=" + isProtected + ", eofFirst=" + eofFirst + ", eofSecond=" + eofSecond + ", sheetName=" + sheetName + ", mixedTableStartString=" + mixedTableStartString + ", afterRows=" + afterRows + "]";
	}

}
